@layout("/common/_curd/_container.html"){






	<form data-url="${basePath}/${code}/save" method="post" class="form-horizontal" role="form">
		<!-- 表单 -->
		<table  class="table table-bordered" >
			<tbody>
				<tr>
					<td>单位</td>
					<td colspan="6">
						<input type="text" id="deptname" name="cloud.dept_name" placeholder="单位名称"  class="form-control" />
					</td>
				</tr>
				<tr>
					<td>办公地址</td>
					<td colspan="6">
						<input type="text" name="cloud.address" placeholder="办公地址"  class="form-control" />
					</td>
				</tr>
				<tr>
					<td>项目名称</td>
					<td colspan="6">
						<input type="text" id="projectname" name="cloud.pro_tname" placeholder="点此选择项目" onclick="dakai2()"  class="form-control" />
					</td>
				</tr>
				<tr>
					<td  rowspan="2"   vertical-align="middle">
						部门联系人
					</td>
					<td>姓名</td>
					<td>
						<input type="text" name="cloud.host_name" placeholder="姓名"  class="form-control" />
					</td>
					<td>单位</td>
					<td colspan="3">
						<input type="text" name="cloud.host_dept"  placeholder="单位"  class="form-control" />
					</td>
				</tr>
				<tr>
					<td>手机</td>
					<td>
						<input type="text" name="cloud.host_tel" placeholder="手机"  class="form-control" />
					</td>
					<td>电话</td>
					<td colspan="3">
						<input type="text" name="cloud.host_phone" placeholder="电话"  class="form-control" />
					</td>
				</tr>
				<tr>
					<td rowspan="2">
						开发单位联系人
					</td>
					<td>姓名</td>
					<td>
						<input type="text" name="cloud.dev_name" placeholder="姓名"  class="form-control" />
					</td>
					<td>单位</td>
					<td colspan="3">
						<input type="text" name="cloud.dev_dept" placeholder="单位"  class="form-control" />
					</td>
				</tr>
				<tr>
					<td>手机</td>
					<td>
						<input type="text" name="cloud.dev_tel" placeholder="手机"  class="form-control" />
					</td>
					<td>电话</td>
					<td colspan="3">
						<input type="text" name="cloud.dev_phone" placeholder="电话"  class="form-control" />
					</td>
				</tr>
				<tr>
					<td>申请应用</td>
					<td colspan="4">应用名称</td>
					<td>虚拟机梳理</td>
					<td width="50px">数量</td>
				</tr>
				<tr>
					<td>1</td>
					<td colspan="4">
						<input type="text" name="cloud.app1_name" placeholder="应用名称"  class="form-control" />
					</td>
					<td>
						<input type="text" id="app1" name="cloud.app1_num"  onclick="dakai(1)"  class="form-control" >
					</td>
					<td>
						<input type="text" id="num1" name="cloud.num1"  class="form-control" >
					</td>
				</tr>
				<tr>
					<td>2</td>
					<td colspan="4">
						<input type="text" name="cloud.app1_name" placeholder="应用名称"  class="form-control" />
					</td>
					<td>
						<input type="text" id="app2" name="cloud.app2_num"  onclick="dakai(2)"  class="form-control" >
					</td>
					<td>
						<input type="text" id="num2"  name="cloud.num2" class="form-control" >
					</td>
				</tr>
				<tr>
					<td>3</td>
					<td colspan="4">
						<input type="text" name="cloud.app3_name" placeholder="应用名称"  class="form-control" />
					</td>
					<td>
						<input type="text" id="app3" name="cloud.app3_num"  onclick="dakai(3)"  class="form-control" >
					</td>
					<td>
						<input type="text" id="num3"  name="cloud.num3" class="form-control" >
					</td>
				</tr>
				<tr>
					<td>开通时间</td>
					<td colspan="6">
						<input type="text" name="cloud.indate" id="indate" placeholder="开通时间"  value="" class="form-control" />
					</td>
				</tr>
				<tr>
					<td>备注</td>
					<td colspan="6">
						<input type="text" name="cloud.remarks" placeholder="备注"  class="form-control" />
					</td>
				</tr>
			</tbody>
		</table>

		<!-- 按钮 -->
		@ include("/common/_curd/_btn.html", {btn_save:"新增", btn_close:"关闭"}) {}
	</form>

@}

	<script language="javascript" type="text/javascript">
		function dakai(num){
			layer.open({
				type: 2,
				title: 'bsp_apply_source',
				shadeClose: true,
				shade: 0.8,
				area: ['100%', '100%'],
				content: 'view', //iframe的url
				end : function(index) {
					var retVal = $("#layerResult").val();//返回一个标记用于控制,业务逻辑( 也可不写)
					if (num == '1') {
						document.getElementById("app1").value=document.getElementById("yuanGong").value;
						document.getElementById("num1").value=1;
					}else if(num == '2'){
						document.getElementById("app2").value=document.getElementById("yuanGong").value;
						document.getElementById("num2").value=1;
					}else if(num == '3'){
						document.getElementById("app3").value=document.getElementById("yuanGong").value;
						document.getElementById("num3").value=1;
					}
				}
			})
		}
		function dakai2(num){
			layer.open({
				type: 2,
				title: 'bsp_apply_source',
				shadeClose: true,
				shade: 0.8,
				area: ['100%', '100%'],
				content: 'view2', //iframe的url
				end : function(index) {
					var retVal = $("#layerResult").val();//返回一个标记用于控制,业务逻辑( 也可不写)
					if (num == '1') {
						document.getElementById("app1").value=document.getElementById("yuanGong").value;
						document.getElementById("num1").value=1;
					}else if(num == '2'){
						document.getElementById("app2").value=document.getElementById("yuanGong").value;
						document.getElementById("num2").value=1;
					}else if(num == '3'){
						document.getElementById("app3").value=document.getElementById("yuanGong").value;
						document.getElementById("num3").value=1;
					}
				}
			})
		}
	</script>
<script src="${basePath}/static/laydate/laydate.js"></script>
<script type="text/javascript">
	laydate({
		elem: '#indate',
		format: 'YYYY-MM-DD', // 分隔符可以任意定义，该例子表示只显示年月日
		//festival: true, //显示节日
		choose: function(datas){ //选择日期完毕的回调
			/*   alert('得到：'+datas); */
		}
	});
</script>
<input type="hidden" id="yuanGong"  onclick="dakai()" size="50">
